package com.ruoyi.store.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.store.mapper.StoCustomerMapper;
import com.ruoyi.store.domain.StoCustomer;
import com.ruoyi.store.service.IStoCustomerService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-29
 */
@Service
public class StoCustomerServiceImpl implements IStoCustomerService 
{
    @Autowired
    private StoCustomerMapper stoCustomerMapper;

    /**
     * 查询用户信息
     * 
     * @param id 用户信息主键
     * @return 用户信息
     */
    @Override
    public StoCustomer selectStoCustomerById(Long id)
    {
        return stoCustomerMapper.selectStoCustomerById(id);
    }

    /**
     * 查询用户信息列表
     * 
     * @param stoCustomer 用户信息
     * @return 用户信息
     */
    @Override
    public List<StoCustomer> selectStoCustomerList(StoCustomer stoCustomer)
    {
        return stoCustomerMapper.selectStoCustomerList(stoCustomer);
    }

    /**
     * 新增用户信息
     * 
     * @param stoCustomer 用户信息
     * @return 结果
     */
    @Override
    public int insertStoCustomer(StoCustomer stoCustomer)
    {
        stoCustomer.setCreateTime(DateUtils.getNowDate());
        return stoCustomerMapper.insertStoCustomer(stoCustomer);
    }

    /**
     * 修改用户信息
     * 
     * @param stoCustomer 用户信息
     * @return 结果
     */
    @Override
    public int updateStoCustomer(StoCustomer stoCustomer)
    {
        return stoCustomerMapper.updateStoCustomer(stoCustomer);
    }

    /**
     * 批量删除用户信息
     * 
     * @param ids 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteStoCustomerByIds(Long[] ids)
    {
        return stoCustomerMapper.deleteStoCustomerByIds(ids);
    }

    /**
     * 删除用户信息信息
     * 
     * @param id 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteStoCustomerById(Long id)
    {
        return stoCustomerMapper.deleteStoCustomerById(id);
    }
}
